home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Camelot
/
Camelot 088 (1990-11)(Swedish User Group of Amiga)(SE)(PD)[WB].zip
/
Camelot 088 (1990-11)(Swedish User Group of Amiga)(SE)(PD)[WB].adf
/
Border
/
Border.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-10-13
|
2KB
|
69 lines
/*=================================================================*/
/*===== globals ===================================================*/
/*=================================================================*/
struct IntuitionBase *IntuitionBase;
struct GfxBase *GfxBase;
struct RastPort *rp;
struct ViewPort *vp;
struct Screen *scrn;
struct ColorMap *cm;
struct TagItem MyTag[] = {
{ VTAG_BORDERBLANK_CLR, TRUE },
{ TAG_DONE, NULL}
};
void myWrite(UBYTE *string)
{
Write(Output(), string, strlen(string));
}
void main(UWORD argc, UBYTE *argv[])
{
struct ExecBase *eb = *((struct ExecBase **)4L);
myWrite("\23333;1m_Border_\2330m Version 1.0\nCopyright © 1990 Synthetic Technologies\n\n");
if(!(eb->LibNode.lib_Version < 36))
{
if(argc==2 && (argv[1][0] != '?'))
{
if(argv[1][1]=='f'||argv[1][1]=='F')
{
MyTag[0].ti_Tag=VTAG_BORDERBLANK_SET;
}
if(IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library", 36L))
{
if(GfxBase = (struct GfxBase *)OpenLibrary("graphics.library", 36L))
{
if(GfxBase->ChipRevBits0 & GFXF_HR_DENISE)
{
if(scrn=LockPubScreen("Workbench"))
{
cm=scrn->ViewPort.ColorMap;
VideoControl(cm,MyTag);
MakeScreen(scrn);
RethinkDisplay();
UnlockPubScreen(NULL,scrn);
}
}
else
{
myWrite("You must have a Super Denise\n\n");
}
CloseLibrary((struct Library *)GfxBase);
}
CloseLibrary((struct Library *)IntuitionBase);
}
}
else
{
myWrite("Usage: border <on|off>\n\n");
}
}
else
{
myWrite("Requires AmigaOS Release 2.0 or higher\n");
}
}